<?php
namespace Hive\Workflow;
/**
 * Workflow Catagory,
 * 
 * It represent the kind of object the workflow is attached to, for instance a Mission, a Contact,
 * an order...
 * 
 *
 * @author Xavier VILAIN
 * @package Hive\Workflow
 *
 * @property string	$type			Id of the Source
 * @property string	$label			Source name
 * @property bool	$standard		Is a standard type (can't be deleted)
 * @property bool	$active			Is an active type (can be selected)
 */
class Category  extends \Fox\Object\Versioned\Customizing {

	/**
	 * Reverse Link to Sources
	 * @var string
	 */
	const LINK_WORKFLOWS = 'workflows';
	
	/**
	 * 
	 * Mission Category
	 * @var string
	 */
	const MISSION = 1;
	
	/**
	 * 
	 * Contact Category
	 * @var string
	 */
	const CANDIDATE = 2;	
}
\Fox\Dao::infos(Category::className(),new \Fox\Object\Info('workflow_categories', \Fox\Databases::DB_APP));
//\Fox\Dao::useZone(Category::className(),new \Fox\Dao\DiskTimeCacheZone(\Fox\Dao\DiskTimeCacheZone::PERIOD_FOREVER,Category::cacheDirectory()));
// Link to i18n elements
\Fox\Object\Links::add(\Fox\Dao::link(Category\I18n::className(),Category::LINK_SOURCE_REFERENCE)
->to(Category::className(), Category::LINK_I18N)
->on('category')
//->cache(new \Fox\Dao\MemoryCacheZone(\Fox\Dao\MemoryCacheZone::PERIOD_FOREVER,Category::cacheDirectory()))
->versionFrom());